﻿#包含目录
INCLUDE_DIRECTORIES("../PotatoGTK/")
INCLUDE_DIRECTORIES("../PotatoGTK/glad/opengl_compatibility_4_6/include")
INCLUDE_DIRECTORIES("GLFW/glfw-3.4/include")

add_executable(Test "main.cpp" "PotatoGLWindowBasic.h" "PotatoGLWindowBasic.cpp" "PotatoGLWindow.h" "PotatoGLWindow.cpp")

#链接库
set(LINK_LIB 
PotatoGTK
glfw3
)

if(WIN32)
target_link_directories(Test PUBLIC ${CMAKE_SOURCE_DIR}/out/build/x64-Debug/Test/GLFW/glfw-3.4/src)
set(LINK_LIB  ${LINK_LIB} opengl32)
else()
target_link_directories(Test PUBLIC ${CMAKE_SOURCE_DIR}/../PotatoGTK/out/build/linux)
target_link_directories(Test PUBLIC ${CMAKE_SOURCE_DIR}/GLFW/glfw-3.4/out/build/linux/src)
set(LINK_LIB  ${LINK_LIB} GL)
endif ()

target_link_libraries(Test 
${LINK_LIB}
)


add_subdirectory("GLFW/glfw-3.4")